#include<iostream>
#include<vector>
using namespace std;

int main()
{   
    string s;
    getline(cin,s);
    cout<<s<<"\n";
    for(auto c : s)
    {
        cout<<c<<" ";
    }
    cout<<"\n";

    for(auto &c : s)
    {
        cout<<c<<" ";
    }
    cout<<"\n";
 
    return 0;
}